package studentmanagement;

public class Student {
   //注意不能声明成静态变量，静态变量只有一个值会导致值被覆盖
    public  int id;
    public  String name;
    public  String sex;

    public Student(int id, String name, String sex) {
        this.id = id;
        this.name = name;
        this.sex = sex;
    }
    public String toString(){
        return("{"+"学号："+id+",姓名："+name+",性别："+sex+"}");
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

}
